package com.db.workcall;
import java.io.*;
public class FileService {
	public static void saveFile(File upload,String path,String fn){
		try{
			File f=new File(path);
			if(!f.isFile())
				f.mkdir();
			//��������
			FileInputStream fis=new FileInputStream(upload);
			FileOutputStream fos=new FileOutputStream(path+"\\"+fn);
			int i=0;
			byte buffer[]=new byte[1024];
			while((i=fis.read(buffer,0,1024))!=-1){
				fos.write(buffer,0,i);
			}
			fis.close();
			fos.close();
			
		}catch(Exception ex){}
	}
}
